import request from '@/utils/request'

// 查询来自finchina的汇率列表
export function listExchangerate(query) {
  return request({
    url: '/operation/exchangerate/list',
    method: 'get',
    params: query
  })
}

// 查询来自finchina的汇率详细
export function getExchangerate(natureday) {
  return request({
    url: '/operation/exchangerate/' + natureday,
    method: 'get'
  })
}

// 新增来自finchina的汇率
export function addExchangerate(data) {
  return request({
    url: '/operation/exchangerate',
    method: 'post',
    data: data
  })
}

// 修改来自finchina的汇率
export function updateExchangerate(data) {
  return request({
    url: '/operation/exchangerate',
    method: 'put',
    data: data
  })
}

// 删除来自finchina的汇率
export function delExchangerate(natureday) {
  return request({
    url: '/operation/exchangerate/' + natureday,
    method: 'delete'
  })
}

export function importData(data){
  return request({
      url:'/operation/exchangerate/import',
      method:'post',
      data:data,
  })
}
